package com.tuanzi.loan.web.lazy.businesssystem;

import com.tuanzi.loan.business.service.businesssystem.BusinessIncomeService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.businesssystem.BusinessIncomeRequest;
import com.tuanzi.loan.vo.response.businesssystem.BusinessIncomeResponse;
import org.springframework.data.domain.Page;


public class BusinessIncomeLazyDataModel extends BaseLazyDataModel<BusinessIncomeRequest, BusinessIncomeResponse> {
    private BusinessIncomeService settlementIncomeService = SpringContextHolder.getBean(BusinessIncomeService.class);
    public BusinessIncomeLazyDataModel(BusinessIncomeRequest settlementIncomeRequest) {
        super(settlementIncomeRequest);
    }
    @Override
    protected Page<BusinessIncomeResponse> doLoad(PageSearcher<BusinessIncomeRequest> pageSearcher) {
        return settlementIncomeService.list(pageSearcher);
    }
}